import { get, post, del } from '../utils/request';

const STORE = 'shop/';
/*
* 店铺信息
* */
export function getStoreInfo(params) {
    return get(`${STORE}selectShop`, params);
}
// export function createStore(params) {
//     return post(`${STORE}createShop`, params);
// }
// export function updateStore(params) {
//     return post(`${STORE}updateStoreInfo`, params);
// }

/* 人员管理 */
const EMPLOY = 'empAdmin/';
export function getMembers(params) {
    return get(`${EMPLOY}selectList`, params);
}
export function addMembere(params) {
    return post(`${EMPLOY}add`, params);
}
export function updateMember(params) {
    return post(`${EMPLOY}update`, params);
}
export function updateEmployeeStatus(params) {
    return post(`${EMPLOY}updateStatus`, params);
}

export function deletEmployee(params) {
    return post(`${EMPLOY}delete`, params);
}
/* 设备管理 */
const DEVICE = 'device/';
export function getDevices(params) {
    return get(`${DEVICE}select`, params);
}
export function addDevice(params) {
    return post(`${DEVICE}add`, params);
}
export function deletDevice(params) {
    return post(`${DEVICE}delete`, params);
}
// export function confirmDevice(deviceId) {
//     return post(`${STORE}${DEVICE}${deviceId}/deviceConfirm`);
// }

/* 游戏管理 */
const PLATFORM = '/api-1/platform/';
export function getGameDict() {
    return get(`${PLATFORM}findGameList`);
}
export function getGameStore(storeId) {
    return get(`${PLATFORM}findShopGameList/${storeId}`);
}
export function updateGameStore(params) {
    return post(`${PLATFORM}updateShopGame`, params);
}


/* 营销活动管理（充值管理）*/
export function getChargeList({storeId, model, ...params}) {
    return get(`${STORE}${storeId}/queryStoreChargeList/${model}`, params);
}
export function addStoreCharge(params) {
    return post(`${STORE}addStoreCharge`, params);
}
export function updateStoreCharge(params) {
    return post(`${STORE}updateStoreCharge`, params);
}
export function deleteStoreCharge(id) {
    return get(`${STORE}${id}/deleteStoreCharge`);
}

/*
* 店铺基础收费模式管理
* */
export function getBaseList({storeId}) {
    return get(`${STORE}${storeId}/queryStoreConsumList/1`);
}
export function addBaseCharge(params) {
    return post(`${STORE}addStoreConsum`, params);
}
export function updateBaseCharge(params) {
    return post(`${STORE}updateStoreConsum`, params);
}
export function deleteBaseCharge({id}) {
    return get(`${STORE}${id}/deleteStoreConsum`);
}

/*
* 以下接口暂时不用
* */
export function getChargeType(storeId) {
    return get(`${STORE}${storeId}/queryRechargeType`);
}
export function addChargeType(params) {
    return post(`${STORE}addRechargeType`, params);
}

export function updateChargeType(params) {
    return post(`${STORE}updateRechargeType`, params);
}
export function removeChargeType(rechargeId) {
    return del(`${STORE}${rechargeId}/delRechargeType`);
}
